-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(connector): [NMI] Implement 3DS for Cards #3143
Conversation
@@ -1479,6 +1479,13 @@ where | |||
let is_error_in_response = router_data.response.is_err(); | |||
// If is_error_in_response is true, should_continue_payment should be false, we should throw the error | |||
(router_data, !is_error_in_response) | |||
} else if connector.connector_name == router_types::Connector::Nmi | |||
&& !matches!(format!("{operation:?}").as_str(), "CompleteAuthorize") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only in case of Payment Confirm we need to trigger Preprocessing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preprocessing_steps
is only implemented for authorize and complete auth flow meaning only these two flow can execute preprocessing. if it matches complete auth flow, it wont enter the body since it is a not operation, leaving only auth flow to enter this body.
_ => Err(errors::ConnectorError::NotSupported { | ||
message: utils::SELECTED_PAYMENT_METHOD.to_string(), | ||
connector: "nmi", | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ => Err(errors::ConnectorError::NotSupported { | |
message: utils::SELECTED_PAYMENT_METHOD.to_string(), | |
connector: "nmi", | |
}) | |
_ => Err(errors::ConnectorError::NotImplemented( | |
utils::get_unimplemented_payment_method_error_message("Nmi"), | |
)) |
let three_ds_data: NmiRedirectResponseData = serde_json::from_value(payload_data) | ||
.into_report() | ||
.change_context(errors::ConnectorError::MissingConnectorRedirectionPayload { | ||
field_name: "cavv", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change "cavv" to "three_ds_data" as cavv is one of the param inside three_ds_data
Type of Change
Description
The flow use:
Additional Changes
Motivation and Context
How did you test it?
No testing can be done since 3DS is not enabled in test account
Checklist
cargo +nightly fmt --all
cargo clippy